package com.swyc.osschat.Test.LambdaTest.Controller;

import java.util.List;

import com.swyc.osschat.Test.LambdaTest.Bean.Student;
import com.swyc.osschat.Test.LambdaTest.IService.LambdaTest;

/**
 * @author zhaol@yunrong.cn
 * @version V2.1
 * @since 2.1.0 2019/8/12 9:51
 */
public class TestCaseLambdaOne {
    public static void sayHello(LambdaTest test){
        String name = test.getName();
        System.out.println("hello I`m " + name);
    }

    public static void killOne(LambdaTest test){
        String name = test.getName();
        System.out.println(name + "is be killed");
    }

    public static void main(String[] args) {
        List<Student> students = Student.generateData();
        students.forEach(e->{
            sayHello(()->e.getName());
            killOne(()->e.getName());
        });
    }
}
